package com.weds.domain_service.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.weds.domain_service.domain.ScUser;
import com.weds.domain_service.mapper.UserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description
 * @Author lihw
 * @Date 2024/2/27 9:34
 */
@Slf4j
@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    public List<ScUser> getUserList() {

        List<ScUser> userList = userMapper.selectList(new QueryWrapper<ScUser>()
                .orderByAsc("user_id")
                .last("limit 20"));

        return userList;
    }
}
